package com.qf.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/*
 *@Description:
 *@author:刘哥
 *@Date:19:43 2022/7/13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
//    包含NULL值显示null
    @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue)
    //    包含NULL值输出""
//    @JSONField(serialzeFeatures = SerializerFeature.WriteNullStringAsEmpty)
    private String username;

    private String password;
    //    忽略属性不显示
    @JSONField(serialize = false)
    private String nikename;
    //    日期格式化
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date birthday;
}
